<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
		<title>认证详情</title>
		<link rel="stylesheet" type="text/css" media="screen" href="{$staticHost}/static/css/base.css" />
		<link rel="stylesheet" type="text/css" media="screen" href="{$staticHost}/static/css/mod.css" />
		<link rel="stylesheet" type="text/css" media="screen" href="{$staticHost}/static/css/list.css" />
		<link rel="stylesheet" type="text/css" media="screen" href="{$staticHost}/static/css/page.css" />

		<script src="{$staticHost}/static/js/jquery-1.8.3.min.js"></script>
		<script src="{$staticHost}/static/js/js.js"></script>
		
</head>
	<body>
		<!-- <div class="load-ios"></div>
		<div class="load "><span></span></div> -->
		<section id="text-box" class="w640">
			
		</section>
		
		<script id="test" type="text/html">
			<% if(status==0){%>
			<div class="bg_gray_light ac f24 color-blue bold p20">资料审核中</div>
			<%}%>
			<% if(status==1){%>
			<div class="bg_gray_light ac f24 color-blue bold p20">资料审核通过</div>
			<%}%>
			<% if(status==2){%>
			<div class="bg_gray_light ac  p20 f15 color_gray lh30">
				<b class="color-red db f24">审核不通过</b>
				<%=reason%>
			</div>
			<%}%>
			<% if(status==3){%>
			<div class="bg_gray_light ac  p20 f15 color_gray lh30">
				<b class="color-red db f24">认证已取消</b>
				<%=reason%>
			</div>
			<%}%>
			<article class="img-60 line-gray-bottom">
				<% if (header.length>0){%>
				<img src=<%=header%> >
				<%}%>
				<% if (header.length==0){%>
				<img src="{$staticHost}/static/images/bg/group_image_nor-min.png">
				<%}%>
				
				<div>
					<h6><%=name%></h6>
						ID:<%=gid%>
				</div>
			</article>
			<ul class="input_list line-gray-bottom">
				<li>
					<span>认证方式</span>
					<%=info %>
				</li>
				<li class="bg_gray_light">
					申请人资料填写
				</li>
				<li>
					<span>真实姓名</span>
					<%=realname %>
				</li>
				<li>
					<span>手机号码</span>
					<%=phone%>
				</li>
				<li>
					<span>身份证号</span>
					<%=card%>
				</li>
			</ul>
			<div class="up-img line-gray-bottom">
				<h6>证件照 <small>证件仅作为认证资质</small></h6>
				<div class="card-img">
					<ul class="cimg-list">
					<%for(var i=0;i<img.length;i++){%>
						<li><img src="<%=img[i]%>" /></li>
					<%}%>
					</ul>
					
				</div>
			</div>
			<% if(status==2||status==3){%>
			<a class="btn-bottom" href="{$staticHost}/show/groupAuth?gid=<%=gid%>">重新申请</a>
			<%}%>
		</script>
		
	</body>
	<script>
		var gid = getQueryStringByName('gid');
		$(function(){
			$.getJSON('{$staticHost}/groupWeb/authDetail',{'gid':gid}, function(data, error) {

				console.log(data);
				var html = template('test', data);
				document.getElementById('text-box').innerHTML = html;
			});

		});
		/***加载数据***/
		function getQueryString() {
	    var result = location.search.match(new RegExp("[\?\&][^\?\&]+=[^\?\&]+", "g"));
	    for (var i = 0; i < result.length; i++) {
	        result[i] = result[i].substring(1);
		    }
		    return result;
		}
		//根据QueryString参数名称获取值
		function getQueryStringByName(name) {
		    var result = location.search.match(new RegExp("[\?\&]" + name + "=([^\&]+)", "i"));
		    if (result == null || result.length < 1) {
		        return "";
		    }
		    return result[1];
		}
		//根据QueryString参数索引获取值
		function getQueryStringByIndex(index) {
		    if (index == null) {
		        return "";
		    }
		    var queryStringList = getQueryString();
		    if (index >= queryStringList.length) {
		        return "";
		    }
		    var result = queryStringList[index];
		    var startIndex = result.indexOf("=") + 1;
		    result = result.substring(startIndex);
		    return result;
		}
	</script>
	<!--页面渲染部分-->

	<script type="text/javascript">

	var browser = {
	versions: function() {
	var u = navigator.userAgent, app = navigator.appVersion;
	return {//移动终端浏览器版本信息 
	trident: u.indexOf('Trident') > -1, //IE内核
	presto: u.indexOf('Presto') > -1, //opera内核
	webKit: u.indexOf('AppleWebKit') > -1, //苹果、谷歌内核
	gecko: u.indexOf('Gecko') > -1 && u.indexOf('KHTML') == -1, //火狐内核
	mobile: !!u.match(/AppleWebKit.*Mobile.*/) || !!u.match(/AppleWebKit/), //是否为移动终端
	ios: !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/), //ios终端
	android: u.indexOf('Android') > -1 || u.indexOf('Linux') > -1, //android终端或者uc浏览器
	iPhone: u.indexOf('iPhone') > -1 || u.indexOf('Mac') > -1, //是否为iPhone或者QQHD浏览器
	iPad: u.indexOf('iPad') > -1, //是否iPad
	webApp: u.indexOf('Safari') == -1 //是否web应该程序，没有头部与底部
	};
	}(),
	language: (navigator.browserLanguage || navigator.language).toLowerCase()
	}
	 
	if (browser.versions.ios || browser.versions.iPhone || browser.versions.iPad) {
		$(".load-ios").css('display','block')
		window.onload=function(){
		$(document).ready(function() { 
		 		 $(".load-ios").css('display','none')
			}); 
		};
	}else if (browser.versions.android) {
	$(".load").css('display','block')
		window.onload=function(){
		$(document).ready(function() { 
		 		 $(".load").css('display','none')
			}); 
		};
	}	
</script>
{template 'show/web-footer'}
